<template>
    <div>
        我是首页<br/>
        参数一：{{$route.params.name}}&nbsp;
        参数二：{{$route.params.age}}
        <br/>
        <router-link to="/home/test1">test1</router-link>
        <br/>
        <button @click="go()">前往我的页面</button>
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        methods:{
            go(){
                // 编程式导航 方法
                //this.$router.push('/mine');  不带传参
                this.$router.push({path:'/mine',query:{name:"赵六",age:18}}); //代传参
            }
        }
    }
</script>

<style lang="scss" scoped>

</style>